<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <taglib name="app\portal\taglib\Portal"/>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>{$title}</title>
    <meta name="keywords" content="{$keyword}"/>
    <meta name="description"
          content="{$description}"/>
    <?php $time = time();?>
    <LINK href="/static/xiaogu/css/common.css?{$time}" rel="stylesheet" type="text/css">
    <LINK href="/static/xiaogu/css/index.css?{$time}" rel="stylesheet" type="text/css">
    <script src="/static/xiaogu/js/jquery-1.10.1.min.js"></script>
    <script>
        $(function() {
            $("#nav .first li").mouseover(function() {
                $("#nav .second").hide();
                $("#nav .first li").removeClass("active");
                $(this).addClass("active");
                $(this).find("ul").show();
            });
            $("#nav .first li").mouseleave(function() {
                $(this).find("ul").hide();
            });

            $("#search-keyword").focus(function () {
                var val = $(this).val();
                if(val == '请输入您想要搜索的内容') {
                    $(this).val("");
                }
            });
            $("#search-keyword").blur(function () {
                var val = $(this).val();
                if(val == '') {
                    $(this).val("请输入您想要搜索的内容");
                }
            });
            $("#search").click(function() {
               document.search.submit();
            });

        });

        //设为首页
        function SetHome(obj,url){
            try{
                obj.style.behavior='url(#default#homepage)';
                obj.setHomePage(url);
            }catch(e){
                if(window.netscape){
                    try{
                        netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
                    }catch(e){
                        alert("抱歉，此操作被浏览器拒绝！\n\n请在浏览器地址栏输入“about:config”并回车然后将[signed.applets.codebase_principal_support]设置为'true'");
                    }
                }else{
                    alert("抱歉，您所使用的浏览器无法完成此操作。\n\n您需要手动将【"+url+"】设置为首页。");
                }
            }
        }
        //收藏本站
        function AddFavorite(title, url) {
            try {
                window.external.addFavorite(url, title);
            }
            catch (e) {
                try {
                    window.sidebar.addPanel(title, url, "");
                }
                catch (e) {
                    alert("抱歉，您所使用的浏览器无法完成此操作。\n\n加入收藏失败，请使用Ctrl+D进行添加");
                }
            }
        }
        //保存到桌面
        function toDesktop(sUrl,sName){
            try {
                var WshShell = new ActiveXObject("WScript.Shell");
                var oUrlLink =          WshShell.CreateShortcut(WshShell.SpecialFolders("Desktop")     + "\\" + sName + ".url");
                oUrlLink.TargetPath = sUrl;
                oUrlLink.Save();
            }
            catch(e)  {
                alert("当前IE安全级别不允许操作！");
            }
        }
    </script>
</head>

<body>
<div class="wrap">
    <div id="header">
        <div class="header-box wrap-box">
            <div class="top-tips">
                <div class="time f">

                    <span>
                        <?php  echo date('Y年m月d日'); ?>&nbsp; &nbsp;
                        星期
                        <?php
                        $w = date('w');
                        $arr = ['日', '一','二', '三', '四', '五','六'];
                        echo $weekDay = $arr[$w];
                    ?>
                    </span>
                </div>
                <div class="right-tools r">
                    <ul>
                        <li>
                            <a href="javascript:void(0)" onclick="SetHome(this,window.location)">设为首页</a>
                        </li>
                        <li>
                            <a href="javascript:void(0)" onclick="AddFavorite(document.title,window.location)">加入收藏</a>
                        </li>
                        <li>
                            <a href="">联系我们</a>
                        </li>
                    </ul>
                </div>
                <div class="c"></div>
            </div>
            <div class="left-box f">

                <div class="logo">
                    <img src="/static/xiaogu/images/logo.png" alt="">
                </div>
            </div>
            <div class="right-box r">
                <div class="search">
                    <form action="{:cmf_url('portal/Index/search')}" name="search">
                        <input type="text" name="keyword" class="search-input" id="search-keyword" value="请输入您想要搜索的内容">
                        <span class="search-btn" id="search"></span>
                    </form>
                </div>
            </div>
            <div class="c"></div>
            <div id="nav">
                <ul class="first">

                    <volist name="navList" id="vo" key="k">
                        <li <if condition="$current_url eq $vo.href">class="active"</if> >
                        <a href="{$vo.href}" target="{$vo.target}">{$vo.name}</a>
                        <if condition="$vo.sub">
                        <ul class="second">
                            <volist name="$vo.sub" id="item">
                               <li><a href="{$item.href}" target="{$item.target}">{$item.name}</a></li>
                            </volist>
                        </ul>
                        </if>
                    </li>
                    </volist>
                </ul>
            </div>
        </div>


    </div>
</div>
